#include<stdio.h>
#include<string.h>

int main()
{
  FILE* fp=fopen("test.txt","r");
  if(!fp)
  {
    printf("file open error");
  }
  char arr[1024];
const  char * str = "hello bit\n";

  while(1)
  {
      ssize_t s=fread(arr,1,strlen(str),fp);
      if(s>0){
        arr[s]=0;
        printf("%s",arr);
      }
      if(feof(fp)){
        break;
      }
  }
  fclose(fp);
  return 0;
}
